
<div class="users form">

	<h2>Friends</h2>
	<?php 
	if ($friends) {
		foreach ($friends as $friend) {	?>
		<div class="friends_listing"> <a href="profile/<?php echo $friend['User']['id'];?>"><?php 		
			if (file_exists('img/profile/user/' . $friend['User']['id'] . '.jpg')) {
           		echo '<p>' . $this->Html->image('profile/user/' . $friend['User']['id']. '.jpg', array('width' => '100')) . '</p>';
           	} else {
           		echo '<p>' . $html->image("default_user.jpg", array('width' => '100')) . '</p>';
           	}
           	echo $friend['User']['first_name'] .  ' ' . $friend['User']['last_name'] . "<p>";
           	echo $this->Html->link(__('delete', true), array('controller'=>'users', 'action'=>'delete_friends', $friend['User']['id']));
		?></a></div><?php 	
		}
	} else {
		echo "<h3>" . 'You have not had any friends yet.' . "</h3>";
	}
	?>

</div>
